<form class="form-inline" method="get">

    <div class="form-group col-xs-2">
        <div class="col-xs-12">
            <input class="form-control" name="user_condition" value="{$user_condition}"
                   placeholder="会员手机|会员姓名|会员ID">
        </div>
    </div>
    <div class="form-group col-xs-2">
        <div class="col-xs-12">
            <input class="form-control" name="un_condition" value="{$un_condition}"
                   placeholder="联盟商名称|联盟商ID">
        </div>
    </div>



    <div class="form-group col-xs-2">
        <div class="col-xs-12">
            <select id="type-selector" name="type" class="form-control" tabindex="-1">
                <option value="">无选择</option>
                <?php foreach($type_list as $itk=>$item){ ?>
                <option value="{$itk}" {if condition="$type==$itk"}selected{/if}>{$item}</option>
                <?php } ?>
            </select>
        </div>
    </div>

    <div class="form-group col-xs-3">
        <div class="col-xs-12">
            <span style="">时间</span>{include file="public/dateRangePicker" picker-name="time_range" /}
        </div>
    </div>

    <div class="form-group col-xs-1">
        <div class="col-xs-12">
            <button type="submit" class="btn btn-success">
                搜索
            </button>
        </div>
    </div>
</form>

<hr>

<table class="table table-striped">
    <thead>
    <tr>
        <td>ID</td>
        <td>会员</td>
        <td>联盟商</td>
        <td>记录类型</td>
        <td>金额变动</td>
        <td>来源【去向】</td>
        <td>时间</td>
        <!--<td>操作</td>-->
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="item"}
    <tr>
        <td>{$item.id}</td>
        <td>
            <label class="label label-danger">{$item.umobile}【ID：{$item.uid}】</label>
        </td>
        <td>
            {$item.untitle}【ID：{$item.union_id}】
        </td>
        <td>{$item.type|get_money_log_type}</td>
        {if condition="$item.money>=0"}
        <td style="font-weight: bold;color: green;">+{$item.money}</td>
        {else/}
        <td style="font-weight: bold;color: red;">{$item.money}</td>
        {/if}
        <td>
            {if condition="$item.type<3"}
            订单记录ID：{$item.source}
            {else/}
            提现记录ID：{$item.source}
            {/if}
        </td>
        <td>
            <p>时间：{$item.create_time|show_datetime}</p>
        </td>
        <!--<td>-->
            <!--<div class="btn-group">-->
                <!--<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">-->
                    <!--操作-->
                    <!--<span class="caret"></span>-->
                <!--</button>-->
                <!--<ul class="dropdown-menu">-->

                    <!--<li>-->
                        <!--<a href="javascript:void(0)" data-toggle="confirm"-->
                           <!--data-title="确认删除"-->
                           <!--data-content="确认删除？，请慎重操作！"-->
                           <!--data-url="{:url('remove',array('id'=>$item['id']))}">-->
                            <!--确认删除-->
                        <!--</a>-->
                    <!--</li>-->

                    <!--<li role="separator" class="divider"></li>-->
                <!--</ul>-->
            <!--</div>-->
        <!--</td>-->

    </tr>
    {/volist}
    </tbody>
</table>

<div class="row">
    <div class="col-xs-12" style="text-align: right;">
        {$list->render()}
    </div>
</div>

<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="application/javascript">
    $(function () {

        //获取分类
        $("#type-selector").select2({
            placeholder: "选择记录类型",
            allowClear: true
        });
    });
</script>